# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: G_Syme <demichan@mail.upb.de>

pkgname=libass
pkgver=0.15.2
pkgrel=1
pkgdesc='A portable library for SSA/ASS subtitles rendering'
arch=(x86_64)
url=https://github.com/libass/libass/
license=(BSD)
depends=(
  fontconfig
  fribidi
  glib2
  glibc
  harfbuzz
  libfreetype.so
)
makedepends=(
  git
  nasm
)
provides=(libass.so)
_tag=c967a5a3d9ec0d36af1148b3fdf2f307a21dd122
source=(git+https://github.com/libass/libass.git#tag=${_tag})
validpgpkeys=(5458C3100671F252B0F4C7708079D18C21AAAAFF) # Oleg Oshmyan (Chortos-2) <chortos@inbox.lv>
b2sums=(SKIP)

pkgver() {
  cd libass

  git describe --tags
}

prepare() {
  cd libass

  ./autogen.sh
}

build() {
  cd libass

  ./configure \
    --prefix=/usr \
    --enable-harfbuzz \
    --enable-fontconfig
  make
}

package() {
  make DESTDIR="${pkgdir}" -C libass install
  install -Dm 644 libass/COPYING -t "${pkgdir}"/usr/share/licenses/libass/
}

# vim: ts=2 sw=2 et:
